.class Lrexsee/ebook/PageFactory$FactoryThread;
.super Ljava/lang/Thread;
.source "PageFactory.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lrexsee/ebook/PageFactory;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "FactoryThread"
.end annotation


# instance fields
.field private final PARAGRAPH_TYPE_IMAGE:I

.field private final PARAGRAPH_TYPE_NORMAL:I

.field private final PARAGRAPH_TYPE_PAGEBREAK:I

.field private final PARAGRAPH_TYPE_PARAGRAPHBREAK:I

.field private currentLineHeight:I

.field private currentPaint:Landroid/graphics/Paint;

.field private currentRect:Landroid/graphics/Rect;

.field private data:Ljava/lang/String;

.field private page:Lrexsee/ebook/Page;

.field final synthetic this$0:Lrexsee/ebook/PageFactory;


# direct methods
.method public constructor <init>(Lrexsee/ebook/PageFactory;)V
    .locals 7

    .prologue
    const/4 v5, 0x0

    .line 177
    iput-object p1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    .line 174
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    .line 162
    const/4 v0, 0x0

    iput v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->PARAGRAPH_TYPE_NORMAL:I

    .line 163
    const/4 v0, 0x1

    iput v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->PARAGRAPH_TYPE_PAGEBREAK:I

    .line 164
    const/4 v0, 0x2

    iput v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->PARAGRAPH_TYPE_PARAGRAPHBREAK:I

    .line 165
    const/4 v0, 0x3

    iput v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->PARAGRAPH_TYPE_IMAGE:I

    .line 170
    # getter for: Lrexsee/ebook/PageFactory;->defaultRect:Landroid/graphics/Rect;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$0(Lrexsee/ebook/PageFactory;)Landroid/graphics/Rect;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    .line 171
    # getter for: Lrexsee/ebook/PageFactory;->defaultPaint:Landroid/graphics/Paint;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$1(Lrexsee/ebook/PageFactory;)Landroid/graphics/Paint;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    .line 172
    iget-object v0, p1, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->line_height:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    const-string v1, "%"

    const-string v2, ""

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/16 v1, 0x96

    invoke-static {v0, v1}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v0

    int-to-float v0, v0

    # getter for: Lrexsee/ebook/PageFactory;->defaultPaint:Landroid/graphics/Paint;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$1(Lrexsee/ebook/PageFactory;)Landroid/graphics/Paint;

    move-result-object v1

    invoke-virtual {v1}, Landroid/graphics/Paint;->getTextSize()F

    move-result v1

    mul-float/2addr v0, v1

    const/high16 v1, 0x42c80000    # 100.0f

    div-float/2addr v0, v1

    float-to-int v0, v0

    iput v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentLineHeight:I

    .line 175
    # getter for: Lrexsee/ebook/PageFactory;->mData:Ljava/lang/String;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$2(Lrexsee/ebook/PageFactory;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    .line 176
    new-instance v0, Lrexsee/ebook/Page;

    # getter for: Lrexsee/ebook/PageFactory;->defaultVerticalAlign:Ljava/lang/String;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$3(Lrexsee/ebook/PageFactory;)Ljava/lang/String;

    move-result-object v2

    # getter for: Lrexsee/ebook/PageFactory;->defaultRect:Landroid/graphics/Rect;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$0(Lrexsee/ebook/PageFactory;)Landroid/graphics/Rect;

    move-result-object v3

    # getter for: Lrexsee/ebook/PageFactory;->defaultBackground:Landroid/graphics/drawable/Drawable;
    invoke-static {p1}, Lrexsee/ebook/PageFactory;->access$4(Lrexsee/ebook/PageFactory;)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    move-object v1, p1

    move-object v6, v5

    invoke-direct/range {v0 .. v6}, Lrexsee/ebook/Page;-><init>(Lrexsee/ebook/PageFactory;Ljava/lang/String;Landroid/graphics/Rect;Landroid/graphics/drawable/Drawable;Lrexsee/core/style/StyleSheet;Lrexsee/core/style/StyleSheet;)V

    iput-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    return-void
.end method

.method private addLine(Lrexsee/ebook/LineInterface;)V
    .locals 5
    .param p1, "newLine"    # Lrexsee/ebook/LineInterface;

    .prologue
    .line 308
    :try_start_0
    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->isPageBreak()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 309
    invoke-direct {p0}, Lrexsee/ebook/PageFactory$FactoryThread;->addPage()V

    .line 310
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    iget-object v1, v2, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    .line 311
    .local v1, "inheriteTitle":Ljava/lang/String;
    new-instance v2, Lrexsee/ebook/Page;

    iget-object v3, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    check-cast p1, Lrexsee/ebook/PageBreakLine;

    .end local p1    # "newLine":Lrexsee/ebook/LineInterface;
    invoke-direct {v2, v3, p1}, Lrexsee/ebook/Page;-><init>(Lrexsee/ebook/PageFactory;Lrexsee/ebook/PageBreakLine;)V

    iput-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    .line 312
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    iput-object v1, v2, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    .line 328
    .end local v1    # "inheriteTitle":Ljava/lang/String;
    :cond_0
    :goto_0
    return-void

    .line 314
    .restart local p1    # "newLine":Lrexsee/ebook/LineInterface;
    :cond_1
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-virtual {v2, p1}, Lrexsee/ebook/Page;->canAdd(Lrexsee/ebook/LineInterface;)Z

    move-result v2

    if-nez v2, :cond_2

    .line 315
    invoke-direct {p0}, Lrexsee/ebook/PageFactory$FactoryThread;->addPage()V

    .line 316
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-virtual {v2}, Lrexsee/ebook/Page;->clone()Lrexsee/ebook/Page;

    move-result-object v2

    iput-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    .line 318
    :cond_2
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-virtual {v2, p1}, Lrexsee/ebook/Page;->add(Lrexsee/ebook/LineInterface;)V

    .line 319
    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getIndexTitle()Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 320
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    iget-object v3, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-interface {p1}, Lrexsee/ebook/LineInterface;->getIndexTitle()Ljava/lang/String;

    move-result-object v4

    iput-object v4, v3, Lrexsee/ebook/Page;->inheriteTitle:Ljava/lang/String;

    iput-object v4, v2, Lrexsee/ebook/Page;->indexTitle:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 325
    .end local p1    # "newLine":Lrexsee/ebook/LineInterface;
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 326
    .local v0, "e":Ljava/lang/Exception;
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v2}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v2

    const-string v3, "PageFactory.addLine"

    invoke-virtual {v2, v3, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private addPage()V
    .locals 3

    .prologue
    .line 331
    :try_start_0
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-virtual {v1}, Lrexsee/ebook/Page;->getContentHeight()I

    move-result v1

    if-nez v1, :cond_0

    .line 338
    :goto_0
    return-void

    .line 332
    :cond_0
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mPages:Ljava/util/ArrayList;
    invoke-static {v2}, Lrexsee/ebook/PageFactory;->access$7(Lrexsee/ebook/PageFactory;)Ljava/util/ArrayList;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    iput v2, v1, Lrexsee/ebook/Page;->index:I

    .line 333
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mPages:Ljava/util/ArrayList;
    invoke-static {v1}, Lrexsee/ebook/PageFactory;->access$7(Lrexsee/ebook/PageFactory;)Ljava/util/ArrayList;

    move-result-object v1

    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->page:Lrexsee/ebook/Page;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 334
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mPageView:Lrexsee/ebook/PageView;
    invoke-static {v1}, Lrexsee/ebook/PageFactory;->access$8(Lrexsee/ebook/PageFactory;)Lrexsee/ebook/PageView;

    move-result-object v1

    invoke-virtual {v1}, Lrexsee/ebook/PageView;->reload()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 335
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 336
    .local v0, "e":Ljava/lang/Exception;
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v1}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v1

    const-string v2, "PageFactory.addPage"

    invoke-virtual {v1, v2, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_0
.end method

.method private getParagraph()Ljava/lang/String;
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 292
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_1

    :cond_0
    move-object v2, v4

    .line 303
    :goto_0
    return-object v2

    .line 294
    :cond_1
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    const-string v3, "\n"

    invoke-virtual {v2, v3}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    .line 295
    .local v0, "index":I
    if-ltz v0, :cond_2

    .line 296
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    const/4 v3, 0x0

    invoke-virtual {v2, v3, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    .line 297
    .local v1, "paragraph":Ljava/lang/String;
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    add-int/lit8 v3, v0, 0x1

    invoke-virtual {v2, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    .line 302
    :goto_1
    const-string v2, "\\t"

    const-string v3, "        "

    invoke-virtual {v1, v2, v3}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    move-object v2, v1

    .line 303
    goto :goto_0

    .line 299
    .end local v1    # "paragraph":Ljava/lang/String;
    :cond_2
    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    .line 300
    .restart local v1    # "paragraph":Ljava/lang/String;
    iput-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->data:Ljava/lang/String;

    goto :goto_1
.end method

.method private getParagraphType(Ljava/lang/String;)I
    .locals 2
    .param p1, "paragraph"    # Ljava/lang/String;

    .prologue
    .line 285
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v0

    .line 286
    .local v0, "check":Ljava/lang/String;
    const-string v1, "<pagebreak "

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "<pagebreak>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "</pagebreak>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "<pagebreak/>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    const/4 v1, 0x1

    .line 289
    :goto_0
    return v1

    .line 287
    :cond_1
    const-string v1, "<paragraphbreak "

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    const-string v1, "<paragraphbreak>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    const-string v1, "</paragraphbreak>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_2

    const-string v1, "<paragraphbreak/>"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    :cond_2
    const/4 v1, 0x2

    goto :goto_0

    .line 288
    :cond_3
    const-string v1, "<img "

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    const/4 v1, 0x3

    goto :goto_0

    .line 289
    :cond_4
    const/4 v1, 0x0

    goto :goto_0
.end method

.method private parseImage(Ljava/lang/String;)V
    .locals 9
    .param p1, "image"    # Ljava/lang/String;

    .prologue
    const/4 v5, -0x1

    const-string v0, "px"

    const-string v0, ""

    .line 245
    :try_start_0
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v0}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v0

    const-string v4, "src"

    invoke-static {p1, v4}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-static {v0, v4}, Lrexsee/core/style/RexseeDrawable;->getDrawable(Lrexsee/core/browser/Browser;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 246
    .local v1, "src":Landroid/graphics/drawable/Drawable;
    const-string v0, "width"

    invoke-static {p1, v0}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 247
    .local v8, "w":Ljava/lang/String;
    if-nez v8, :cond_0

    move v2, v5

    .line 248
    .local v2, "width":I
    :goto_0
    const-string v0, "height"

    invoke-static {p1, v0}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    .line 249
    .local v7, "h":Ljava/lang/String;
    if-nez v7, :cond_1

    move v3, v5

    .line 250
    .local v3, "height":I
    :goto_1
    new-instance v0, Lrexsee/ebook/DrawableLine;

    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    invoke-virtual {v4}, Landroid/graphics/Rect;->width()I

    move-result v4

    iget-object v5, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    invoke-virtual {v5}, Landroid/graphics/Rect;->height()I

    move-result v5

    invoke-direct/range {v0 .. v5}, Lrexsee/ebook/DrawableLine;-><init>(Landroid/graphics/drawable/Drawable;IIII)V

    invoke-direct {p0, v0}, Lrexsee/ebook/PageFactory$FactoryThread;->addLine(Lrexsee/ebook/LineInterface;)V

    .line 254
    .end local v1    # "src":Landroid/graphics/drawable/Drawable;
    .end local v2    # "width":I
    .end local v3    # "height":I
    .end local v7    # "h":Ljava/lang/String;
    .end local v8    # "w":Ljava/lang/String;
    :goto_2
    return-void

    .line 247
    .restart local v1    # "src":Landroid/graphics/drawable/Drawable;
    .restart local v8    # "w":Ljava/lang/String;
    :cond_0
    const-string v0, "px"

    const-string v4, ""

    invoke-virtual {v8, v0, v4}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/4 v4, -0x1

    invoke-static {v0, v4}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v0

    move v2, v0

    goto :goto_0

    .line 249
    .restart local v2    # "width":I
    .restart local v7    # "h":Ljava/lang/String;
    :cond_1
    const-string v0, "px"

    const-string v4, ""

    invoke-virtual {v7, v0, v4}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const/4 v4, -0x1

    invoke-static {v0, v4}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    move v3, v0

    goto :goto_1

    .line 251
    .end local v1    # "src":Landroid/graphics/drawable/Drawable;
    .end local v2    # "width":I
    .end local v7    # "h":Ljava/lang/String;
    .end local v8    # "w":Ljava/lang/String;
    :catch_0
    move-exception v0

    move-object v6, v0

    .line 252
    .local v6, "e":Ljava/lang/Exception;
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v0}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v0

    const-string v4, "PageFactory.parseImage"

    invoke-virtual {v0, v4, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_2
.end method

.method private parsePageBreak(Ljava/lang/String;)V
    .locals 14
    .param p1, "pageBreak"    # Ljava/lang/String;

    .prologue
    .line 209
    :try_start_0
    const-string v0, "style"

    invoke-static {p1, v0}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    .line 210
    .local v10, "styleString":Ljava/lang/String;
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v0, v0, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v0

    invoke-virtual {v0, v10}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v9

    .line 212
    .local v9, "style":Lrexsee/core/style/StyleSheet;
    iget-object v0, v9, Lrexsee/core/style/StyleSheet;->label_background_color:Ljava/lang/String;

    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v1, v1, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    iget-object v1, v1, Lrexsee/core/style/StyleSheet;->label_background_color:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getAlpha()F

    move-result v0

    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v1, v1, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v1}, Lrexsee/core/style/StyleSheet;->getAlpha()F

    move-result v1

    cmpl-float v0, v0, v1

    if-nez v0, :cond_0

    .line 213
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->defaultBackground:Landroid/graphics/drawable/Drawable;
    invoke-static {v0}, Lrexsee/ebook/PageFactory;->access$4(Lrexsee/ebook/PageFactory;)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 219
    .local v3, "background":Landroid/graphics/drawable/Drawable;
    :goto_0
    new-instance v0, Landroid/graphics/Rect;

    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getLabelPaddingLeft()I

    move-result v1

    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getLabelPaddingTop()I

    move-result v2

    iget-object v11, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget v11, v11, Lrexsee/ebook/PageFactory;->mWidth:I

    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getLabelPaddingRight()I

    move-result v12

    sub-int/2addr v11, v12

    iget-object v12, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget v12, v12, Lrexsee/ebook/PageFactory;->mHeight:I

    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getLabelPaddingBottom()I

    move-result v13

    sub-int/2addr v12, v13

    invoke-direct {v0, v1, v2, v11, v12}, Landroid/graphics/Rect;-><init>(IIII)V

    iput-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    .line 221
    const-string v0, "header"

    invoke-static {p1, v0}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 222
    .local v8, "headerString":Ljava/lang/String;
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v0, v0, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v0

    invoke-virtual {v0, v8}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v4

    .line 224
    .local v4, "header":Lrexsee/core/style/StyleSheet;
    const-string v0, "footer"

    invoke-static {p1, v0}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    .line 225
    .local v7, "footerString":Ljava/lang/String;
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v0, v0, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v0}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v0

    invoke-virtual {v0, v7}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v5

    .line 227
    .local v5, "footer":Lrexsee/core/style/StyleSheet;
    new-instance v0, Lrexsee/ebook/PageBreakLine;

    iget-object v1, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    iget-object v2, v9, Lrexsee/core/style/StyleSheet;->text_vertical_align:Ljava/lang/String;

    invoke-direct/range {v0 .. v5}, Lrexsee/ebook/PageBreakLine;-><init>(Landroid/graphics/Rect;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Lrexsee/core/style/StyleSheet;Lrexsee/core/style/StyleSheet;)V

    invoke-direct {p0, v0}, Lrexsee/ebook/PageFactory$FactoryThread;->addLine(Lrexsee/ebook/LineInterface;)V

    .line 231
    .end local v3    # "background":Landroid/graphics/drawable/Drawable;
    .end local v4    # "header":Lrexsee/core/style/StyleSheet;
    .end local v5    # "footer":Lrexsee/core/style/StyleSheet;
    .end local v7    # "footerString":Ljava/lang/String;
    .end local v8    # "headerString":Ljava/lang/String;
    .end local v9    # "style":Lrexsee/core/style/StyleSheet;
    .end local v10    # "styleString":Ljava/lang/String;
    :goto_1
    return-void

    .line 215
    .restart local v9    # "style":Lrexsee/core/style/StyleSheet;
    .restart local v10    # "styleString":Ljava/lang/String;
    :cond_0
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v0}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v0

    iget-object v1, v9, Lrexsee/core/style/StyleSheet;->label_background_color:Ljava/lang/String;

    invoke-static {v0, v1}, Lrexsee/core/style/RexseeDrawable;->getDrawable(Lrexsee/core/browser/Browser;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    .line 216
    .restart local v3    # "background":Landroid/graphics/drawable/Drawable;
    const/4 v0, 0x0

    const/4 v1, 0x0

    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget v2, v2, Lrexsee/ebook/PageFactory;->mWidth:I

    iget-object v11, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget v11, v11, Lrexsee/ebook/PageFactory;->mHeight:I

    invoke-virtual {v3, v0, v1, v2, v11}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 217
    invoke-virtual {v9}, Lrexsee/core/style/StyleSheet;->getAlpha()F

    move-result v0

    const/high16 v1, 0x437f0000    # 255.0f

    mul-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v0

    invoke-virtual {v3, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 228
    .end local v3    # "background":Landroid/graphics/drawable/Drawable;
    .end local v9    # "style":Lrexsee/core/style/StyleSheet;
    .end local v10    # "styleString":Ljava/lang/String;
    :catch_0
    move-exception v0

    move-object v6, v0

    .line 229
    .local v6, "e":Ljava/lang/Exception;
    iget-object v0, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v0}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v0

    const-string v1, "PageFactory.parsePageBreak"

    invoke-virtual {v0, v1, v6}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method private parseParagraphBreak(Ljava/lang/String;)V
    .locals 7
    .param p1, "paragraphBreak"    # Ljava/lang/String;

    .prologue
    .line 234
    :try_start_0
    const-string v4, "style"

    invoke-static {p1, v4}, Lrexsee/core/utilities/Utilities;->getAttribute(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 235
    .local v3, "styleString":Ljava/lang/String;
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    iget-object v4, v4, Lrexsee/ebook/PageFactory;->mStyle:Lrexsee/core/style/StyleSheet;

    invoke-virtual {v4}, Lrexsee/core/style/StyleSheet;->clone()Lrexsee/core/style/StyleSheet;

    move-result-object v4

    invoke-virtual {v4, v3}, Lrexsee/core/style/StyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/style/StyleSheet;

    move-result-object v2

    .line 236
    .local v2, "style":Lrexsee/core/style/StyleSheet;
    invoke-static {v2}, Lrexsee/ebook/PageFactory;->getPaint(Lrexsee/core/style/StyleSheet;)Landroid/graphics/Paint;

    move-result-object v1

    .line 237
    .local v1, "p":Landroid/graphics/Paint;
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->defaultPaint:Landroid/graphics/Paint;
    invoke-static {v4}, Lrexsee/ebook/PageFactory;->access$1(Lrexsee/ebook/PageFactory;)Landroid/graphics/Paint;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->defaultPaint:Landroid/graphics/Paint;
    invoke-static {v4}, Lrexsee/ebook/PageFactory;->access$1(Lrexsee/ebook/PageFactory;)Landroid/graphics/Paint;

    move-result-object v4

    :goto_0
    iput-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    .line 238
    iget-object v4, v2, Lrexsee/core/style/StyleSheet;->line_height:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v4

    const-string v5, "%"

    const-string v6, ""

    invoke-virtual {v4, v5, v6}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const/16 v5, 0x96

    invoke-static {v4, v5}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v4

    int-to-float v4, v4

    iget-object v5, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    invoke-virtual {v5}, Landroid/graphics/Paint;->getTextSize()F

    move-result v5

    mul-float/2addr v4, v5

    const/high16 v5, 0x42c80000    # 100.0f

    div-float/2addr v4, v5

    float-to-int v4, v4

    iput v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentLineHeight:I

    .line 242
    .end local v1    # "p":Landroid/graphics/Paint;
    .end local v2    # "style":Lrexsee/core/style/StyleSheet;
    .end local v3    # "styleString":Ljava/lang/String;
    :goto_1
    return-void

    .line 237
    .restart local v1    # "p":Landroid/graphics/Paint;
    .restart local v2    # "style":Lrexsee/core/style/StyleSheet;
    .restart local v3    # "styleString":Ljava/lang/String;
    :cond_0
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    invoke-virtual {v1, v4}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_1

    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :cond_1
    move-object v4, v1

    goto :goto_0

    .line 239
    .end local v1    # "p":Landroid/graphics/Paint;
    .end local v2    # "style":Lrexsee/core/style/StyleSheet;
    .end local v3    # "styleString":Ljava/lang/String;
    :catch_0
    move-exception v4

    move-object v0, v4

    .line 240
    .local v0, "e":Ljava/lang/Exception;
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v4}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v4

    const-string v5, "PageFactory.parseParagraphBreak"

    invoke-virtual {v4, v5, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method

.method private parseText(Ljava/lang/String;)V
    .locals 8
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    const-string v4, "<title>"

    const-string v4, ""

    .line 257
    :try_start_0
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v4

    if-nez v4, :cond_0

    .line 258
    new-instance v4, Lrexsee/ebook/TextLine;

    const-string v5, ""

    iget v6, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentLineHeight:I

    iget-object v7, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    invoke-direct {v4, v5, v6, v7}, Lrexsee/ebook/TextLine;-><init>(Ljava/lang/String;ILandroid/graphics/Paint;)V

    invoke-direct {p0, v4}, Lrexsee/ebook/PageFactory$FactoryThread;->addLine(Lrexsee/ebook/LineInterface;)V

    .line 260
    :cond_0
    const/4 v3, 0x0

    .line 261
    .local v3, "title":Ljava/lang/String;
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v4

    const-string v5, "<title>"

    invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 262
    const-string v4, ">"

    invoke-virtual {p1, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x1

    aget-object v3, v4, v5

    .line 263
    if-eqz v3, :cond_1

    const-string v4, "<"

    invoke-virtual {v3, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    aget-object v3, v4, v5

    .line 264
    :cond_1
    const-string v4, "<title>"

    const-string v5, ""

    invoke-virtual {p1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 265
    const-string v4, "</title>"

    const-string v5, ""

    invoke-virtual {p1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 266
    const-string v4, "<TITLE>"

    const-string v5, ""

    invoke-virtual {p1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 267
    const-string v4, "</TITLE>"

    const-string v5, ""

    invoke-virtual {p1, v4, v5}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p1

    .line 269
    :cond_2
    :goto_0
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v4

    if-gtz v4, :cond_3

    .line 282
    .end local v3    # "title":Ljava/lang/String;
    :goto_1
    return-void

    .line 270
    .restart local v3    # "title":Ljava/lang/String;
    :cond_3
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    const/4 v5, 0x1

    iget-object v6, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentRect:Landroid/graphics/Rect;

    invoke-virtual {v6}, Landroid/graphics/Rect;->width()I

    move-result v6

    int-to-float v6, v6

    const/4 v7, 0x0

    invoke-virtual {v4, p1, v5, v6, v7}, Landroid/graphics/Paint;->breakText(Ljava/lang/String;ZF[F)I

    move-result v2

    .line 271
    .local v2, "size":I
    new-instance v1, Lrexsee/ebook/TextLine;

    const/4 v4, 0x0

    invoke-virtual {p1, v4, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v4

    iget v5, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentLineHeight:I

    iget-object v6, p0, Lrexsee/ebook/PageFactory$FactoryThread;->currentPaint:Landroid/graphics/Paint;

    invoke-direct {v1, v4, v5, v6}, Lrexsee/ebook/TextLine;-><init>(Ljava/lang/String;ILandroid/graphics/Paint;)V

    .line 272
    .local v1, "line":Lrexsee/ebook/TextLine;
    if-eqz v3, :cond_4

    .line 273
    iput-object v3, v1, Lrexsee/ebook/TextLine;->indexTitle:Ljava/lang/String;

    .line 274
    const/4 v3, 0x0

    .line 276
    :cond_4
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->addLine(Lrexsee/ebook/LineInterface;)V

    .line 277
    invoke-virtual {p1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object p1

    goto :goto_0

    .line 279
    .end local v1    # "line":Lrexsee/ebook/TextLine;
    .end local v2    # "size":I
    .end local v3    # "title":Ljava/lang/String;
    :catch_0
    move-exception v4

    move-object v0, v4

    .line 280
    .local v0, "e":Ljava/lang/Exception;
    iget-object v4, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v4}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v4

    const-string v5, "PageFactory.parseText"

    invoke-virtual {v4, v5, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method


# virtual methods
.method public run()V
    .locals 4

    .prologue
    .line 182
    :try_start_0
    invoke-direct {p0}, Lrexsee/ebook/PageFactory$FactoryThread;->getParagraph()Ljava/lang/String;

    move-result-object v1

    .line 183
    .local v1, "paragraph":Ljava/lang/String;
    :goto_0
    if-nez v1, :cond_0

    .line 200
    invoke-direct {p0}, Lrexsee/ebook/PageFactory$FactoryThread;->addPage()V

    .line 201
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    const/4 v3, 0x0

    invoke-static {v2, v3}, Lrexsee/ebook/PageFactory;->access$5(Lrexsee/ebook/PageFactory;Z)V

    .line 205
    .end local v1    # "paragraph":Ljava/lang/String;
    :goto_1
    return-void

    .line 184
    .restart local v1    # "paragraph":Ljava/lang/String;
    :cond_0
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->getParagraphType(Ljava/lang/String;)I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 195
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->parseText(Ljava/lang/String;)V

    .line 198
    :goto_2
    invoke-direct {p0}, Lrexsee/ebook/PageFactory$FactoryThread;->getParagraph()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 186
    :pswitch_0
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->parsePageBreak(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_2

    .line 202
    .end local v1    # "paragraph":Ljava/lang/String;
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 203
    .local v0, "e":Ljava/lang/Exception;
    iget-object v2, p0, Lrexsee/ebook/PageFactory$FactoryThread;->this$0:Lrexsee/ebook/PageFactory;

    # getter for: Lrexsee/ebook/PageFactory;->mBrowser:Lrexsee/core/browser/Browser;
    invoke-static {v2}, Lrexsee/ebook/PageFactory;->access$6(Lrexsee/ebook/PageFactory;)Lrexsee/core/browser/Browser;

    move-result-object v2

    const-string v3, "PageFactory.createFactory"

    invoke-virtual {v2, v3, v0}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1

    .line 189
    .end local v0    # "e":Ljava/lang/Exception;
    .restart local v1    # "paragraph":Ljava/lang/String;
    :pswitch_1
    :try_start_1
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->parseParagraphBreak(Ljava/lang/String;)V

    goto :goto_2

    .line 192
    :pswitch_2
    invoke-direct {p0, v1}, Lrexsee/ebook/PageFactory$FactoryThread;->parseImage(Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_2

    .line 184
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method
